<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\UserAccount
 *
 * @property int $id
 * @property int $user_id
 * @property string $admin_user
 * @property string $amount
 * @property int $add_time
 * @property int $paid_time
 * @property string $admin_note
 * @property string $user_note
 * @property int $process_type
 * @property string $payment
 * @property int $is_paid
 * @property string|null $bank_addr 开户行地址
 * @property string|null $bank_cart cart
 * @property string|null $bank_account 开户行
 * @property-read \App\Models\User|null $user
 * @method static \Illuminate\Database\Eloquent\Builder|UserAccount newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|UserAccount newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|UserAccount query()
 * @method static \Illuminate\Database\Eloquent\Builder|UserAccount whereAddTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|UserAccount whereAdminNote($value)
 * @method static \Illuminate\Database\Eloquent\Builder|UserAccount whereAdminUser($value)
 * @method static \Illuminate\Database\Eloquent\Builder|UserAccount whereAmount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|UserAccount whereBankAccount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|UserAccount whereBankAddr($value)
 * @method static \Illuminate\Database\Eloquent\Builder|UserAccount whereBankCart($value)
 * @method static \Illuminate\Database\Eloquent\Builder|UserAccount whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|UserAccount whereIsPaid($value)
 * @method static \Illuminate\Database\Eloquent\Builder|UserAccount wherePaidTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|UserAccount wherePayment($value)
 * @method static \Illuminate\Database\Eloquent\Builder|UserAccount whereProcessType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|UserAccount whereUserId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|UserAccount whereUserNote($value)
 * @mixin \Eloquent
 */
class UserAccount extends Model
{
    protected $table = 'user_account';
    protected $fillable = [
        'user_id', 'admin_user', 'amount', 'add_time', 'paid_time',
        'admin_note', 'user_note', 'process_type', 'payment',
        'is_paid', 'bank_addr', 'bank_cart', 'bank_account'
    ];

    public $timestamps = false;

    public function user()
    {
        return $this->belongsTo(User::class, 'user_id', 'user_id');
    }
}
